package com.zym.service.impl;

import com.zym.entity.SysRole;
import com.zym.mapper.SysRoleMapper;
import com.zym.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Override
    public List<SysRole> findAll() {
        return sysRoleMapper.selectAll();
    }

    @Override
    public int add(SysRole sysRole) {
        return sysRoleMapper.insert(sysRole);
    }

    @Override
    public int remove(Long id) {
        return sysRoleMapper.delete(id);
    }

    @Override
    public int modify(SysRole sysRole) {
        return sysRoleMapper.updates(sysRole);
    }
}
